package com.kingdee.eas.scm.sm.pur.app;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;
import com.kingdee.eas.scm.sm.pur.PurOrderEntryCollection;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.eas.framework.CoreBillEntryBaseCollection;
import com.kingdee.bos.metadata.entity.SelectorItemCollection;
import com.kingdee.eas.framework.CoreBaseCollection;
import com.kingdee.eas.scm.common.SCMBillEntryBaseCollection;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.eas.scm.sm.pur.PurOrderEntryInfo;
import com.kingdee.eas.framework.CoreBaseInfo;
import com.kingdee.eas.scm.common.app.SCMBillEntryBaseControllerBean;



public abstract class AbstractPurOrderEntryControllerBean extends SCMBillEntryBaseControllerBean implements PurOrderEntryController
{
    protected AbstractPurOrderEntryControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("26041CC5");
    }

    public void handClose(Context ctx, IObjectPK[] pks, IObjectValue[] reasonCodes) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("74b1d7d5-0105-1000-e000-01a4c0a81226"), new Object[]{ctx, pks, reasonCodes});
            invokeServiceBefore(svcCtx);
            _handClose(ctx, pks, reasonCodes);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _handClose(Context ctx, IObjectPK[] pks, IObjectValue[] reasonCodes) throws BOSException, EASBizException;

    public void handClose(Context ctx, IObjectPK[] pks, String[] reason) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("3fabab5e-010e-1000-e000-000cc0a812d9"), new Object[]{ctx, pks, reason});
            invokeServiceBefore(svcCtx);
            _handClose(ctx, pks, reason);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _handClose(Context ctx, IObjectPK[] pks, String[] reason) throws BOSException, EASBizException;

    public void freezed(Context ctx, IObjectPK[] pks, IObjectValue[] reasonCode) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("74b1d7d5-0105-1000-e000-01a5c0a81226"), new Object[]{ctx, pks, reasonCode});
            invokeServiceBefore(svcCtx);
            _freezed(ctx, pks, reasonCode);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _freezed(Context ctx, IObjectPK[] pks, IObjectValue[] reasonCode) throws BOSException, EASBizException;

    public void freezed(Context ctx, IObjectPK[] pks, String[] reasonCode) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("44ad8ec3-010e-1000-e000-0022c0a812d9"), new Object[]{ctx, pks, reasonCode});
            invokeServiceBefore(svcCtx);
            _freezed(ctx, pks, reasonCode);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _freezed(Context ctx, IObjectPK[] pks, String[] reasonCode) throws BOSException, EASBizException;

    public void unFreezed(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("74b1d7d5-0105-1000-e000-01a6c0a81226"), new Object[]{ctx, pks});
            invokeServiceBefore(svcCtx);
            _unFreezed(ctx, pks);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _unFreezed(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException;

    public PurOrderEntryInfo getPurOrderEntryInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7630bdc6-0105-1000-e000-0034c0a81233"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            PurOrderEntryInfo retValue = (PurOrderEntryInfo)_getValue(ctx, pk);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        return super._getValue(ctx, pk);
    }

    public PurOrderEntryInfo getPurOrderEntryInfo(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7630bdc6-0105-1000-e000-0035c0a81233"), new Object[]{ctx, pk, selector});
            invokeServiceBefore(svcCtx);
            PurOrderEntryInfo retValue = (PurOrderEntryInfo)_getValue(ctx, pk, selector);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException
    {
        return super._getValue(ctx, pk, selector);
    }

    public PurOrderEntryInfo getPurOrderEntryInfo(Context ctx, String oql) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7630bdc6-0105-1000-e000-0036c0a81233"), new Object[]{ctx, oql});
            invokeServiceBefore(svcCtx);
            PurOrderEntryInfo retValue = (PurOrderEntryInfo)_getValue(ctx, oql);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, String oql) throws BOSException, EASBizException
    {
        return super._getValue(ctx, oql);
    }

    public PurOrderEntryCollection getPurOrderEntryCollection(Context ctx) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7630bdc6-0105-1000-e000-0037c0a81233"), new Object[]{ctx});
            invokeServiceBefore(svcCtx);
            PurOrderEntryCollection retValue = (PurOrderEntryCollection)_getCollection(ctx, svcCtx);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx) throws BOSException
    {
        return super._getCollection(ctx, svcCtx);
    }

    public PurOrderEntryCollection getPurOrderEntryCollection(Context ctx, EntityViewInfo view) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7630bdc6-0105-1000-e000-0038c0a81233"), new Object[]{ctx, view});
            invokeServiceBefore(svcCtx);
            PurOrderEntryCollection retValue = (PurOrderEntryCollection)_getCollection(ctx, svcCtx, view);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx, EntityViewInfo view) throws BOSException
    {
        return super._getCollection(ctx, svcCtx, view);
    }

    public PurOrderEntryCollection getPurOrderEntryCollection(Context ctx, String oql) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7630bdc6-0105-1000-e000-0039c0a81233"), new Object[]{ctx, oql});
            invokeServiceBefore(svcCtx);
            PurOrderEntryCollection retValue = (PurOrderEntryCollection)_getCollection(ctx, svcCtx, oql);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx, String oql) throws BOSException
    {
        return super._getCollection(ctx, svcCtx, oql);
    }

    public void canFreezed(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("203d773c-0107-1000-e000-000ac0a8121b"), new Object[]{ctx, pks});
            invokeServiceBefore(svcCtx);
            _canFreezed(ctx, pks);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _canFreezed(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException;

    public void canHandClose(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d49b85ef-0107-1000-e000-0031c0a8121b"), new Object[]{ctx, pks});
            invokeServiceBefore(svcCtx);
            _canHandClose(ctx, pks);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _canHandClose(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException;

    public void handCloseWithLog(Context ctx, IObjectValue model) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ae7341b9-0109-1000-e000-0014c0a81254"), new Object[]{ctx, model});
            invokeServiceBefore(svcCtx);
            _handCloseWithLog(ctx, model);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _handCloseWithLog(Context ctx, IObjectValue model) throws BOSException, EASBizException;

    public void freezedWithLog(Context ctx, IObjectValue model) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ae7341b9-0109-1000-e000-0015c0a81254"), new Object[]{ctx, model});
            invokeServiceBefore(svcCtx);
            _freezedWithLog(ctx, model);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _freezedWithLog(Context ctx, IObjectValue model) throws BOSException, EASBizException;

    public void unFreezedWithLog(Context ctx, IObjectValue model) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ae7341b9-0109-1000-e000-0016c0a81254"), new Object[]{ctx, model});
            invokeServiceBefore(svcCtx);
            _unFreezedWithLog(ctx, model);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _unFreezedWithLog(Context ctx, IObjectValue model) throws BOSException, EASBizException;

    public void freezed(Context ctx, IObjectPK pk, IObjectValue reasonCode) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("bc3389f1-0112-1000-e000-0027c0a812a7"), new Object[]{ctx, pk, reasonCode});
            invokeServiceBefore(svcCtx);
            _freezed(ctx, pk, reasonCode);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _freezed(Context ctx, IObjectPK pk, IObjectValue reasonCode) throws BOSException, EASBizException;

    public void freezed(Context ctx, IObjectPK pk, String reason) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("bc3389f1-0112-1000-e000-0028c0a812a7"), new Object[]{ctx, pk, reason});
            invokeServiceBefore(svcCtx);
            _freezed(ctx, pk, reason);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _freezed(Context ctx, IObjectPK pk, String reason) throws BOSException, EASBizException;

    public void unFreezed(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("bc3389f1-0112-1000-e000-0029c0a812a7"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _unFreezed(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _unFreezed(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void handClose(Context ctx, IObjectPK pk, IObjectValue reasonCode) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("bc3389f1-0112-1000-e000-002ac0a812a7"), new Object[]{ctx, pk, reasonCode});
            invokeServiceBefore(svcCtx);
            _handClose(ctx, pk, reasonCode);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _handClose(Context ctx, IObjectPK pk, IObjectValue reasonCode) throws BOSException, EASBizException;

    public void handClose(Context ctx, IObjectPK pk, String reason) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("bc3389f1-0112-1000-e000-002bc0a812a7"), new Object[]{ctx, pk, reason});
            invokeServiceBefore(svcCtx);
            _handClose(ctx, pk, reason);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _handClose(Context ctx, IObjectPK pk, String reason) throws BOSException, EASBizException;

    public void handleUnclose(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d4507c93-0114-1000-e000-0022c0a812a5"), new Object[]{ctx, pks});
            invokeServiceBefore(svcCtx);
            _handleUnclose(ctx, pks);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _handleUnclose(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException;

    public void handleUnclose(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d509758e-0114-1000-e000-0033c0a812a5"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _handleUnclose(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _handleUnclose(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public SCMBillEntryBaseCollection getSCMBillEntryBaseCollection (Context ctx) throws BOSException
    {
    	return (SCMBillEntryBaseCollection)(getPurOrderEntryCollection(ctx).cast(SCMBillEntryBaseCollection.class));
    }
    public SCMBillEntryBaseCollection getSCMBillEntryBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (SCMBillEntryBaseCollection)(getPurOrderEntryCollection(ctx, view).cast(SCMBillEntryBaseCollection.class));
    }
    public SCMBillEntryBaseCollection getSCMBillEntryBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (SCMBillEntryBaseCollection)(getPurOrderEntryCollection(ctx, oql).cast(SCMBillEntryBaseCollection.class));
    }
    public CoreBillEntryBaseCollection getCoreBillEntryBaseCollection (Context ctx) throws BOSException
    {
    	return (CoreBillEntryBaseCollection)(getPurOrderEntryCollection(ctx).cast(CoreBillEntryBaseCollection.class));
    }
    public CoreBillEntryBaseCollection getCoreBillEntryBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (CoreBillEntryBaseCollection)(getPurOrderEntryCollection(ctx, view).cast(CoreBillEntryBaseCollection.class));
    }
    public CoreBillEntryBaseCollection getCoreBillEntryBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (CoreBillEntryBaseCollection)(getPurOrderEntryCollection(ctx, oql).cast(CoreBillEntryBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx) throws BOSException
    {
    	return (CoreBaseCollection)(getPurOrderEntryCollection(ctx).cast(CoreBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (CoreBaseCollection)(getPurOrderEntryCollection(ctx, view).cast(CoreBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (CoreBaseCollection)(getPurOrderEntryCollection(ctx, oql).cast(CoreBaseCollection.class));
    }
}